//
//  ZQHttpTool.h
//  basketball_phone_lite
//
//  Created by Action on 15/5/20.
//  Copyright (c) 2015年 hzzq.com. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface XCHttpTool : NSObject

/**
 *  发送get请求
 *
 *  @param URLString  请求的基本的url
 *  @param parameters 请求的参数字典
 *  @param success    请求成功的回调
 *  @param failure    请求失败的回调
 */
+ (void)GET:(NSString *)URLString
 parameters:(id)parameters
    success:(void (^)(id responseObject))success
    failure:(void (^)(NSError *error))failure;

/**
 *  发送post请求
 *
 *  @param URLString  请求的基本的url
 *  @param parameters 请求的参数字典
 *  @param success    请求成功的回调
 *  @param failure    请求失败的回调
 */
+ (void)Post:(NSString *)URLString
  parameters:(id)parameters
     success:(void (^)(id responseObject))success
     failure:(void (^)(NSError *error))failure;

/*
    上传多张图片
 */
+ (void)Post:(NSString *)URLString parameters:(NSDictionary *)parameters ImageArr:(NSArray *)imageArr ImageName:(NSString *)imageName audioPath:(NSString *)audioPath audio:(NSString *)audio audioName:(NSString *)audioName success:(void (^)(id))success failure:(void (^)(NSError *))failure;

/*
 上传单张图片
 */
+ (void)Post:(NSString *)URLString parameters:(NSDictionary *)parameters UIImage:(UIImage *)image ImageName:(NSString *)imageName audioPath:(NSString *)audioPath audio:(NSString *)audio audioName:(NSString *)audioName success:(void (^)(id))success  failure:(void (^)(NSError *))failure;

/*
 下载音频
 */
+ (void)downLoadVoiceWithURLStr:(NSString *)urlStr success:(void (^)(id))success failure:(void (^)(NSError *))failure;

+ (void)downLoadVoiceWithURLStr:(NSString *)urlStr target:(void (^)(id))target  success:(void (^)(id))success failure:(void (^)(NSError *))failure;


@end
